/**
 * Copyright (c) 2010 Simple Graph Tools contributors. All rights reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 *   http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 * $Id$
 */
package org.sgt.coredef;

import org.eclipse.emf.common.util.EList;

import org.eclipse.emf.ecore.EStructuralFeature;

/**
 * <!-- begin-user-doc -->
 * A representation of the model object '<em><b>Proxy</b></em>'.
 * <!-- end-user-doc -->
 *
 * <!-- begin-model-doc -->
 * <p>
 * The {@link Proxy} represents an {@link EObject} that may belong to another model in an attempt to provide low coupling between models.
 * The {@link Proxy} can be used to maintain synchronization during model edition between an external object and its values leaving both
 * models independant on transformation exit. This temporary synchronization can be done in either push (to external object) or pull (to proxy) :
 * <ul>
 * <li>The {@link Proxy} can be attached to the external object, synchronized with it and then detached (setting representedObject to null).</li>
 * <li>Alternatively the {@link Proxy} can be attached to an external object, synchronize this external objects values (push proxy values to external object) and then detacched.</li>
 * </ul>
 * </p>
 * <p>See {@link org.sgt.coredef.util.ProxyHelper} for the default implementation of this objects' behaviour</p>
 * <!-- end-model-doc -->
 *
 * <p>
 * The following features are supported:
 * <ul>
 *   <li>{@link org.sgt.coredef.Proxy#getRepresentedObject <em>Represented Object</em>}</li>
 * </ul>
 * </p>
 *
 * @see org.sgt.coredef.CoredefPackage#getProxy()
 * @model
 * @generated
 */
public interface Proxy<T> extends DescribedObject {
	/**
	 * Returns the value of the '<em><b>Represented Object</b></em>' reference.
	 * <!-- begin-user-doc -->
	 * <p>
	 * If the meaning of the '<em>Represented Object</em>' reference isn't clear,
	 * there really should be more of a description here...
	 * </p>
	 * <!-- end-user-doc -->
	 * @return the value of the '<em>Represented Object</em>' reference.
	 * @see #setRepresentedObject(Object)
	 * @see org.sgt.coredef.CoredefPackage#getProxy_RepresentedObject()
	 * @model kind="reference"
	 * @generated
	 */
	T getRepresentedObject();

	/**
	 * Sets the value of the '{@link org.sgt.coredef.Proxy#getRepresentedObject <em>Represented Object</em>}' reference.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @param value the new value of the '<em>Represented Object</em>' reference.
	 * @see #getRepresentedObject()
	 * @generated
	 */
	void setRepresentedObject(T value);

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * <!-- begin-model-doc -->
	 * <p>
	 * Determines whether <B>all features of the featuresList</B> from represented object and this proxy
	 * are synchronized. The feature list is the one of the represented objects EClass.
	 * A default implementation is found in {@link org.sgt.coredef.util.ProxyHelper#isSyncronized(Proxy, EList)}
	 * </p>
	 * <!-- end-model-doc -->
	 * @model featuresListMany="false"
	 * @generated
	 */
	boolean isSynchronised(EList<EStructuralFeature> featuresList);

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * <!-- begin-model-doc -->
	 * <p>
	 * Synchronizes <B>all features of the featuresList</B> from  this proxy to represented object.
	 * The feature list is the one of the represented objects EClass.
	 * A default implementation is found in {@link org.sgt.coredef.util.ProxyHelper#syncRepresentation(Proxy, EList)}
	 * </p>
	 * <!-- end-model-doc -->
	 * @model featuresListMany="false"
	 * @generated
	 */
	boolean syncRepresentation(EList<EStructuralFeature> featuresList);

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * <!-- begin-model-doc -->
	 * <p>
	 * Synchronizes <B>all features of the featuresList</B> from represented object to this proxy.
	 * The feature list is the one of the represented objects EClass.
	 * A default implementation is found in {@link org.sgt.coredef.util.ProxyHelper#syncProxy(Proxy, EList)}
	 * </p>
	 * <!-- end-model-doc -->
	 * @model featuresListMany="false"
	 * @generated
	 */
	boolean syncProxy(EList<EStructuralFeature> featuresList);

} // Proxy
